package cn.com.gainfo.recks.business.webpayFTP;

import java.util.List;

import javax.sql.DataSource;

import cn.com.gainfo.recks.dao.webpayFTP.WebpayFTPDAO;
import cn.com.gainfo.recks.vo.NlistenfileVO;
import cn.com.gainfo.recks.vo.NwebpayVO;
import cn.com.gainfo.recks.vo.NwebpaycodeVo;
import cn.yzyue.base.business.AbstractBusiness;
import cn.yzyue.base.vo.VO;

public class WebpayFTPBusiness extends AbstractBusiness{
	
    private WebpayFTPDAO  dao =null;
	
	public WebpayFTPBusiness() {
		dao=new WebpayFTPDAO();
	}
	
	
	@Override
	public boolean add(DataSource dataSource, VO vo) {
		// TODO Auto-generated method stub
		return dao.add(dataSource, vo);
	}


	@Override
	public List find(DataSource dataSource, VO vo, int page) {
		// TODO Auto-generated method stub
		return dao.find(dataSource, vo, page);
	}

	@Override
	public VO findByIds(DataSource dataSource, VO vo, String[] ids) {
		// TODO Auto-generated method stub
		return dao.findByIds(dataSource, vo, ids);
	}
	
	
	
	@Override
	public List find(DataSource dataSource, String sql) {
		return dao.find(dataSource, sql);
	}
	
	public String getWebpay(String date1 , String date2 , String transtime){
		String sql = "select   id  ,  transtime   from  fileurl   where   filetype = '2' and  flag = '1' and transtime = '"+transtime+"' and  uploaddate>='"+date1+"'  and  uploaddate<='"+date2+"'  " ;
		return sql;
	}
	
	public String getWebpayL(String date1 , String date2 , String transtime){
		String sql = "select   id   from  nlistenfile   where   filetype = '2'  and  dateflag ='1'  and transtime = '"+transtime+"'   and  ddtime>='"+date1+"'  and  ddtime<='"+date2+"'  " ;
		return sql;
	}
	
	
	
	public  boolean   insertFTPWebpayDate(DataSource dataSource , List<NwebpayVO> data , NlistenfileVO nf){
		return dao.insertFTPWebpayDate(dataSource, data , nf);
	}
	
	
	public  boolean   insertWebpayCodeDate(DataSource dataSource , List<NwebpaycodeVo> dataCode){
	
		return dao.insertWebpayCode(dataSource, dataCode);
	}
	
	
	
	
	
}
